﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="DeleteTimeSlots.aspx.cs" Inherits="cs499.TimeSlots.DeleteTimeSlots" %>
<%@ MasterType VirtualPath="~/Site.Master" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="NavOptions" runat="server">
    <asp:Button ID="CancelButton" runat="server" OnClick="CancelButton_Click" Text="Cancel" Width="133px" />
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="FeaturedContent" runat="server">
    <section class="featured">
        <div class="content-wrapper">
            <h3>List of Time Slots</h3>
        </div>
    </section>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="MainContent" runat="server">
    <asp:GridView ID="GridView1" runat="server" AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="Id" DataSourceID="EntityDataSource2" OnRowDeleting="GridView1_RowDeleting">
        <Columns>
            <asp:CommandField ShowDeleteButton="True" />
            <asp:TemplateField HeaderText="Days" SortExpression="Days">
                <ItemTemplate>
                <asp:Label ID="Label1" runat="server" Text='<%# cs499.Database.TimeSlot.DaystoString((cs499.Database.DayOfWeek)Eval("Days")) %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="StartTime" HeaderText="StartTime" SortExpression="StartTime" />
            <asp:BoundField DataField="Length" HeaderText="Length" SortExpression="Length" />
        </Columns>
    </asp:GridView>
    <asp:EntityDataSource ID="EntityDataSource2" runat="server" ConnectionString="name=Model1Container" DefaultContainerName="Model1Container" EnableFlattening="False" EntitySetName="TimeSlots" EntityTypeFilter="TimeSlot" EnableDelete="True">
    </asp:EntityDataSource>
</asp:Content>
